Optimal. Leaf size=56 \[ \frac{4 x^3}{15}-\frac{16 x^2}{25}-\frac{1573 \log \left (5 x^2+3 x+2\right )}{1250}+\frac{381 x}{125}+\frac{8349 \tan ^{-1}\left (\frac{10 x+3}{\sqrt{31}}\right )}{625 \sqrt{31}} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0513899, antiderivative size = 56, normalized size of antiderivative = 1., number of steps used = 6, number of rules used = 5, integrand size = 25, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.2, Rules used = {1657, 634, 618, 204, 628} \[ \frac{4 x^3}{15}-\frac{16 x^2}{25}-\frac{1573 \log \left (5 x^2+3 x+2\right )}{1250}+\frac{381 x}{125}+\frac{8349 \tan ^{-1}\left (\frac{10 x+3}{\sqrt{31}}\right )}{625 \sqrt{31}} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 1657
Rule 634
Rule 618
Rule 204
Rule 628
Rubi steps
\begin{align*} \int \frac{\left (3-x+2 x^2\right )^2}{2+3 x+5 x^2} \, dx &=\int \left (\frac{381}{125}-\frac{32 x}{25}+\frac{4 x^2}{5}+\frac{121 (3-13 x)}{125 \left (2+3 x+5 x^2\right )}\right ) \, dx\\ &=\frac{381 x}{125}-\frac{16 x^2}{25}+\frac{4 x^3}{15}+\frac{121}{125} \int \frac{3-13 x}{2+3 x+5 x^2} \, dx\\ &=\frac{381 x}{125}-\frac{16 x^2}{25}+\frac{4 x^3}{15}-\frac{1573 \int \frac{3+10 x}{2+3 x+5 x^2} \, dx}{1250}+\frac{8349 \int \frac{1}{2+3 x+5 x^2} \, dx}{1250}\\ &=\frac{381 x}{125}-\frac{16 x^2}{25}+\frac{4 x^3}{15}-\frac{1573 \log \left (2+3 x+5 x^2\right )}{1250}-\frac{8349}{625} \operatorname{Subst}\left (\int \frac{1}{-31-x^2} \, dx,x,3+10 x\right )\\ &=\frac{381 x}{125}-\frac{16 x^2}{25}+\frac{4 x^3}{15}+\frac{8349 \tan ^{-1}\left (\frac{3+10 x}{\sqrt{31}}\right )}{625 \sqrt{31}}-\frac{1573 \log \left (2+3 x+5 x^2\right )}{1250}\\ \end{align*}
Mathematica [A] time = 0.01929, size = 53, normalized size = 0.95 \[ \frac{10 x \left (100 x^2-240 x+1143\right )-4719 \log \left (5 x^2+3 x+2\right )}{3750}+\frac{8349 \tan ^{-1}\left (\frac{10 x+3}{\sqrt{31}}\right )}{625 \sqrt{31}} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.044, size = 44, normalized size = 0.8 \begin{align*}{\frac{381\,x}{125}}-{\frac{16\,{x}^{2}}{25}}+{\frac{4\,{x}^{3}}{15}}-{\frac{1573\,\ln \left ( 5\,{x}^{2}+3\,x+2 \right ) }{1250}}+{\frac{8349\,\sqrt{31}}{19375}\arctan \left ({\frac{ \left ( 3+10\,x \right ) \sqrt{31}}{31}} \right ) } \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.48807, size = 58, normalized size = 1.04 \begin{align*} \frac{4}{15} \, x^{3} - \frac{16}{25} \, x^{2} + \frac{8349}{19375} \, \sqrt{31} \arctan \left (\frac{1}{31} \, \sqrt{31}{\left (10 \, x + 3\right )}\right ) + \frac{381}{125} \, x - \frac{1573}{1250} \, \log \left (5 \, x^{2} + 3 \, x + 2\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 0.993161, size = 165, normalized size = 2.95 \begin{align*} \frac{4}{15} \, x^{3} - \frac{16}{25} \, x^{2} + \frac{8349}{19375} \, \sqrt{31} \arctan \left (\frac{1}{31} \, \sqrt{31}{\left (10 \, x + 3\right )}\right ) + \frac{381}{125} \, x - \frac{1573}{1250} \, \log \left (5 \, x^{2} + 3 \, x + 2\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A] time = 0.188934, size = 63, normalized size = 1.12 \begin{align*} \frac{4 x^{3}}{15} - \frac{16 x^{2}}{25} + \frac{381 x}{125} - \frac{1573 \log{\left (x^{2} + \frac{3 x}{5} + \frac{2}{5} \right )}}{1250} + \frac{8349 \sqrt{31} \operatorname{atan}{\left (\frac{10 \sqrt{31} x}{31} + \frac{3 \sqrt{31}}{31} \right )}}{19375} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.16036, size = 58, normalized size = 1.04 \begin{align*} \frac{4}{15} \, x^{3} - \frac{16}{25} \, x^{2} + \frac{8349}{19375} \, \sqrt{31} \arctan \left (\frac{1}{31} \, \sqrt{31}{\left (10 \, x + 3\right )}\right ) + \frac{381}{125} \, x - \frac{1573}{1250} \, \log \left (5 \, x^{2} + 3 \, x + 2\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]